<table width="100%" id="poupPODetail" align="left">
<tr>
{foreach from=$arrTitle item=title}
	{if ($title !='supplier_id') And ($title !='id')}
	<th>
		{if $title =='name'}
			Supplier name
		{else}
			{$title|dragon_column_name}
		{/if}
	</th>
	{/if}
{/foreach}
	{if $arrTitle}
	<th>Supplier</th>
	<th>Action</th>
	{/if}
</tr>
{assign var='c' value=0}
{foreach from=$arrResult item=result}
	<tr {if ($c % 2 == 1) } class="bg" {/if}>
		{assign var='c' value=$c+1}
	{foreach from=$result item=cell key=f name=i}
	{if ($f !='supplier_id') And ($f !='id')}
		<td {if ($f =='product_name' || $f=='sku')} style="text-align:left" {/if}>
			{if ($f=='name') }
			<a href="javascript:void(0)" onclick="PODetail.pop_up({$result.id})">
					{$cell}
					</a>
			{elseif ($f=='cost_item' || $f=='quantity' || $f=='item_tax_amount')}
			   <input id="{$f}__{$result.id}"
				{if ($cell)}
					value="{$cell}" 
				{else}
				   value="0"
				{/if}
				size="5"/>
			{else}
				{$cell}
			{/if}		
		</td>
	{/if}
	{/foreach}
	<td>
		<select name="supplier" style="padding:0px;" id="supplier_id__{$result.id}">
			{foreach from=$arrSupplier item=supplier}
				<option value="{$supplier.id}"{if $supplierId==$supplier.id} selected="selected"{/if}>&nbsp;&nbsp;{$supplier.name} &nbsp;&nbsp;</option>
			{/foreach}
		</select>
	</td>
	<td>
	<a href="javascript:void(0)" id="save_{$result.id}" class="save-ajax-detail">Save</a> | 
	<a href="javascript:void(0)" id="delete_{$result.id}" class="delete-ajax">Delete</a> 
	</td>
</tr>
{/foreach}
</table>